package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.util.*;

public final class login_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();

  private static java.util.List _jspx_dependants;

  private javax.el.ExpressionFactory _el_expressionfactory;
  private org.apache.AnnotationProcessor _jsp_annotationprocessor;

  public Object getDependants() {
    return _jspx_dependants;
  }

  public void _jspInit() {
    _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
    _jsp_annotationprocessor = (org.apache.AnnotationProcessor) getServletConfig().getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName());
  }

  public void _jspDestroy() {
  }

  public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;


    try {
      response.setContentType("text/html;charset=utf-8");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n");
      out.write(" \r\n");
      out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\r\n");
      out.write("<html>\r\n");
      out.write("  <head>\r\n");
      out.write("  \t <title>jbpm工作流系统</title>\r\n");
      out.write("  \t ");
      org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "/liger/liger.jsp", out, false);
      out.write("\r\n");
      out.write(" <style type=\"text/css\">\r\n");
      out.write("        *{ padding:0; margin:0;}\r\n");
      out.write("        body{ text-align:center; background:#4974A4;}\r\n");
      out.write("        #login{ width:740px; margin:0 auto; font-size:12px;}\r\n");
      out.write("        #loginlogo{ width:700px; height:100px; overflow:hidden; background:url('') no-repeat; margin-top:50px;   }\r\n");
      out.write("        #loginpanel{ width:729px; position:relative;height:300px;}\r\n");
      out.write("        .panel-h{ width:729px; height:20px; background:url('img/login/panel-h.gif') no-repeat; position:absolute; top:0px; left:0px; z-index:3;}\r\n");
      out.write("        .panel-f{ width:729px; height:13px; background:url('img/login/panel-f.gif') no-repeat; position:absolute; bottom:-5px; left:0px; z-index:3;}\r\n");
      out.write("        .panel-c{ z-index:2;background:url('img/login/panel-c.gif') repeat-y;width:729px; height:300px;}\r\n");
      out.write("        .panel-c-l{ position:absolute; left:60px; top:40px;}\r\n");
      out.write("        .panel-c-r{ position:absolute; right:20px; top:50px; width:222px; line-height:200%; text-align:left;}\r\n");
      out.write("        .panel-c-l h3{ color:#556A85; margin-bottom:10px;}\r\n");
      out.write("        .panel-c-l td{ padding:7px;}\r\n");
      out.write("        \r\n");
      out.write("        \r\n");
      out.write("        .login-text{ height:24px; left:24px; border:1px solid #e9e9e9; background:#f9f9f9;}\r\n");
      out.write("        .login-text-focus{ border:1px solid #E6BF73;}\r\n");
      out.write("        .login-btn{width:114px; height:29px; color:#E9FFFF; line-height:29px; background:url('img/login/login-btn.gif') no-repeat; border:none; overflow:hidden; cursor:pointer;}\r\n");
      out.write("        #txtUsername,#txtPassword{ width:191px;} \r\n");
      out.write("        #logincopyright{ text-align:center; color:White; margin-top:50px;}\r\n");
      out.write("    </style>\r\n");
      out.write("    <script type=\"text/javascript\">\r\n");
      out.write("    \t//获取QueryString的数组\r\n");
      out.write("\t\tfunction getQueryString()\r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t    var result = location.search.match(new RegExp(\"[\\?\\&][^\\?\\&]+=[^\\?\\&]+\", \"g\"));\r\n");
      out.write("\t\t    if (result == null)\r\n");
      out.write("\t\t    {\r\n");
      out.write("\t\t        return \"\";\r\n");
      out.write("\t\t    }\r\n");
      out.write("\t\t    for (var i = 0; i < result.length; i++)\r\n");
      out.write("\t\t    {\r\n");
      out.write("\t\t        result[i] = result[i].substring(1);\r\n");
      out.write("\t\t    }\r\n");
      out.write("\t\t    return result;\r\n");
      out.write("\t\t}\r\n");
      out.write("\t\t//根据QueryString参数名称获取值\r\n");
      out.write("\t\tfunction getQueryStringByName(name)\r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t    var result = location.search.match(new RegExp(\"[\\?\\&]\" + name + \"=([^\\&]+)\", \"i\"));\r\n");
      out.write("\t\t    if (result == null || result.length < 1)\r\n");
      out.write("\t\t    {\r\n");
      out.write("\t\t        return \"\";\r\n");
      out.write("\t\t    }\r\n");
      out.write("\t\t    return result[1];\r\n");
      out.write("\t\t}\r\n");
      out.write("\t\t//根据QueryString参数索引获取值\r\n");
      out.write("\t\tfunction getQueryStringByIndex(index)\r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t    if (index == null)\r\n");
      out.write("\t\t    {\r\n");
      out.write("\t\t        return \"\";\r\n");
      out.write("\t\t    }\r\n");
      out.write("\t\t    var queryStringList = getQueryString();\r\n");
      out.write("\t\t    if (index >= queryStringList.length)\r\n");
      out.write("\t\t    {\r\n");
      out.write("\t\t        return \"\";\r\n");
      out.write("\t\t    }\r\n");
      out.write("\t\t    var result = queryStringList[index];\r\n");
      out.write("\t\t    var startIndex = result.indexOf(\"=\") + 1;\r\n");
      out.write("\t\t    result = result.substring(startIndex);\r\n");
      out.write("\t\t    return result;\r\n");
      out.write("\t\t}\r\n");
      out.write("\r\n");
      out.write("        var FromUrl = getQueryStringByName(\"FromUrl\");\r\n");
      out.write("        if (!FromUrl)\r\n");
      out.write("        {\r\n");
      out.write("        \t//linkController.do?index\r\n");
      out.write("            FromUrl = encodeURIComponent(\"loginController.do?loginCheck\");\r\n");
      out.write("        }\r\n");
      out.write("        $(function ()\r\n");
      out.write("        {\r\n");
      out.write("            $(\".login-text\").focus(function ()\r\n");
      out.write("            {\r\n");
      out.write("                $(this).addClass(\"login-text-focus\");\r\n");
      out.write("            }).blur(function ()\r\n");
      out.write("            {\r\n");
      out.write("                $(this).removeClass(\"login-text-focus\");\r\n");
      out.write("            });\r\n");
      out.write("\r\n");
      out.write("            $(document).keydown(function (e)\r\n");
      out.write("            {\r\n");
      out.write("                if (e.keyCode == 13)\r\n");
      out.write("                {\r\n");
      out.write("                    dologin();\r\n");
      out.write("                }\r\n");
      out.write("            });\r\n");
      out.write("\r\n");
      out.write("            $(\"#btnLogin\").click(function ()\r\n");
      out.write("            {\r\n");
      out.write("                dologin();\r\n");
      out.write("            });\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("            function dologin()\r\n");
      out.write("            {\r\n");
      out.write("                var username = $(\"#txtUsername\").val();\r\n");
      out.write("                var password = $(\"#txtPassword\").val();\r\n");
      out.write("                \r\n");
      out.write("                if (username == \"\")\r\n");
      out.write("                {\r\n");
      out.write("                    alert('账号不能为空!');\r\n");
      out.write("                    $(\"#txtUsername\").focus();\r\n");
      out.write("                    return;\r\n");
      out.write("                }\r\n");
      out.write("                if (password == \"\")\r\n");
      out.write("                {\r\n");
      out.write("                    alert('密码不能为空!');\r\n");
      out.write("                    $(\"#txtPassword\").focus();\r\n");
      out.write("                    return;\r\n");
      out.write("                }\r\n");
      out.write("                \r\n");
      out.write("                $.ajax({\r\n");
      out.write("                    type: 'post', \r\n");
      out.write("                    cache: false, \r\n");
      out.write("                    dataType: 'json',\r\n");
      out.write("                    url: 'loginController.do?login',\r\n");
      out.write("                    data: $('#theForm').serialize(),\r\n");
      out.write("                    success: function (msg)\r\n");
      out.write("                    {\r\n");
      out.write("                        if (!msg.success)\r\n");
      out.write("                        {\r\n");
      out.write("                            alert('登陆失败,账号或密码有误!');\r\n");
      out.write("                            $(\"#txtUsername\").focus();\r\n");
      out.write("                            return;\r\n");
      out.write("                        } else\r\n");
      out.write("                        {\r\n");
      out.write("                            location.href = decodeURIComponent(FromUrl);\r\n");
      out.write("                        }\r\n");
      out.write("                       \r\n");
      out.write("                    },\r\n");
      out.write("                    error: function ()\r\n");
      out.write("                    {\r\n");
      out.write("                        alert('发送系统错误,请与系统管理员联系!');\r\n");
      out.write("                    },\r\n");
      out.write("                    beforeSend: function ()\r\n");
      out.write("                    {\r\n");
      out.write("                        $.ligerDialog.waitting(\"正在登陆中,请稍后...\");\r\n");
      out.write("                        $(\"#btnLogin\").attr(\"disabled\", true);\r\n");
      out.write("                    },\r\n");
      out.write("                    complete: function ()\r\n");
      out.write("                    {\r\n");
      out.write("                        $.ligerDialog.closeWaitting();\r\n");
      out.write("                        $(\"#btnLogin\").attr(\"disabled\", false);\r\n");
      out.write("                    }\r\n");
      out.write("                });\r\n");
      out.write("            }\r\n");
      out.write("\r\n");
      out.write("            $(\"#txtUsername\").focus();\r\n");
      out.write("        });\r\n");
      out.write("    </script>\r\n");
      out.write("</head>\r\n");
      out.write("<body style=\"padding:10px;background:#EAEEF5;\"> \r\n");
      out.write("    <div id=\"login\">\r\n");
      out.write("        <div id=\"loginlogo\"></div>\r\n");
      out.write("        <div id=\"loginpanel\">\r\n");
      out.write("            <div class=\"panel-h\"></div>\r\n");
      out.write("            <div class=\"panel-c\">\r\n");
      out.write("                <div class=\"panel-c-l\">\r\n");
      out.write("                    <form id=\"theForm\">\r\n");
      out.write("                    \t<table cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("                        <tbody>\r\n");
      out.write("                         <tr>\r\n");
      out.write("                            <td align=\"left\" colspan=\"2\"> \r\n");
      out.write("                             <h3>请使用jpbm 工作流系统账号登陆</h3>\r\n");
      out.write("                            </td>\r\n");
      out.write("                            </tr> \r\n");
      out.write("                            <tr>\r\n");
      out.write("                            <td align=\"right\">账号：</td><td align=\"left\"><input type=\"text\" name=\"loginCode\" id=\"txtUsername\" class=\"login-text\" value=\"admin\" /></td>\r\n");
      out.write("                            </tr>\r\n");
      out.write("                            <tr>\r\n");
      out.write("                            <td align=\"right\">密码：</td><td align=\"left\"><input type=\"password\" name=\"loginPass\" id=\"txtPassword\" class=\"login-text\" value=\"lsyd\" /></td>\r\n");
      out.write("                            </tr> \r\n");
      out.write("                            <tr>\r\n");
      out.write("                            <td align=\"center\" colspan=\"2\">\r\n");
      out.write("                                <input type=\"submit\" id=\"btnLogin\" value=\"登陆\" class=\"login-btn\" />\r\n");
      out.write("                            </td>\r\n");
      out.write("                            </tr> \r\n");
      out.write("                        </tbody>\r\n");
      out.write("                    </table>\r\n");
      out.write("                    </form>\r\n");
      out.write("                </div>\r\n");
      out.write("                <div class=\"panel-c-r\">\r\n");
      out.write("                <p>请从左侧输入登录账号和密码登录</p>\r\n");
      out.write("                <p>如果遇到系统问题，请联系网络管理员。</p>\r\n");
      out.write("                <p>如果没有账号，请联系网站管理员。 </p>\r\n");
      out.write("                <p>......</p>\r\n");
      out.write("                </div>\r\n");
      out.write("            </div>\r\n");
      out.write("            <div class=\"panel-f\"></div>\r\n");
      out.write("        </div>\r\n");
      out.write("    </div>\r\n");
      out.write("</body>\r\n");
      out.write("</html>\r\n");
      out.write("     ");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try { out.clearBuffer(); } catch (java.io.IOException e) {}
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}
